//
//  LoginButton.swift
//  物料商行
//
//  Created by HaoDong Hong on 2017/7/21.
//  Copyright © 2017年 HaoDong Hong. All rights reserved.
//

import UIKit

class LoginButton: UIButton {

    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        
        UIView.animate(withDuration: 0.5) {
            self.transform = CGAffineTransform(scaleX: 0.95, y: 0.95)
        }
        super.touchesBegan(touches, with: event)
        
    }
    
    override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
        UIView.animate(withDuration: 0.5) {
            self.transform = .identity
        }
        super.touchesEnded(touches, with: event)
        
    }
    

}
